import {
  bannerlist
} from '../../../request/api'
const state = {
  bannerlist: []
}

const getters = {
  getBanner(state) {
    return state.bannerlist
  }
}

const mutations = {
  REQ_BANNERLIST(state, payload) {
    state.bannerlist = payload
  }
}

const actions = {
  getBnnerAction({
    commit
  }) {
    bannerlist().then(res => {
      commit('REQ_BANNERLIST', res.list)
    })
  }
}

export default {
  state,
  getters,
  mutations,
  actions,
  namespaced: true
}